alter table jms_dm.dm_cusc_tyd_taking_waybill_detail_dt set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_cusc_tyd_taking_waybill_detail_dt;
create external table jms_dm.dm_cusc_tyd_taking_waybill_detail_dt
(
    id                   string comment '订单编号',
    waybill_id           string comment '运单号',
    proxy_area_code      string comment '代理区code',
    proxy_area_name      string comment '代理区名称',
    pick_network_code    string comment '取件网点code',
    pick_network_name    string comment '取件网点名称',
    sender_province_id   string comment '寄件省份id',
    sender_province_name string comment '寄件省份名称',
    sender_city_id       string comment '寄件城市名id',
    sender_city_name     string comment '寄件城市名',
    customer_code        string comment '客户编号code',
    customer_name        string comment '客户编号名称',
    order_source_code    string comment '订单来源code',
    order_source_name    string comment '订单来源名称',
    order_status_code    string comment '订单状态code 剔除已取消订单104,已取件对应103',
    input_time           string comment '订单录入时间',
    date_time            string comment '日期'
) COMMENT '兔优达揽收-明细'
    PARTITIONED BY ( dt STRING COMMENT '订单录入时间')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_cusc_tyd_taking_waybill_detail_dt'
;
